/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package taskmanager2ndedition.server;

import taskmanager2ndedition.exceptions.ObjectNotFoundException;
import java.util.List;

/**
 *
 * @author denaas
 */
public interface Storage<T> {
    /**
     * 
     * @param obj object to be deleted from storage
     */
    public void remove(int id) throws ObjectNotFoundException;
    /**
     * 
     * @param id object id
     * @return object
     */
    public T get(int id) throws ObjectNotFoundException;
    /**
     * 
     * @param obj object to be saved into storage
     */
    public void add(T obj);
    /**
     * 
     * @param obj object to be updated in storage
     */
    public void update(T obj);
    /**
     * 
     * @return get all objects from storage
     */
    public List<T> getAll();
    /**
     * 
     * @param list save all the objects to storage
     */
    public void saveAll(List<T> list);
    public List<T> getGroup(int id);
}
